{% url 'index-view' as index_url %}
{% url 'all-view' as all_url %}
{% url 'news-view' as news_url %}


<header id="vmaig-header" class="navbar navbar-inverse navbar-fixed-top navbar-vmaig">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#vmaig-navbar-collapse">
                <span class="sr-only">切换导航</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <div class="navbar-brand">{{website_title}}</div>
        </div>
        <div class="collapse navbar-collapse" id="vmaig-navbar-collapse">
            <ul class="nav navbar-nav">
                <li class="">
                <a href="{{index_url}}?column={{request.session.column}}">
                    <span class="glyphicon glyphicon-home"></span>
                    首页
                </a>
                </li>
                <li>
                <a href="{{all_url}}">
                    <span class="glyphicon glyphicon-globe"></span>
                    全部文章
                </a>
                </li>
                <li>
                <a href="{{news_url}}">
                    <span class="glyphicon glyphicon-star-empty"></span>
                    资讯
                </a>
                </li>
                
                {% if nav_list%}
                {% for nav in nav_list%}
                <li>
                    <a href="{{nav.url}}">
                        {{nav.name}}
                    </a>
                </li>
                {% endfor%}
                {% endif%}
            </ul>
            <ul class="nav navbar-nav navbar-right">
                
                <li class="dropdown">
                <a href="javascript:;" style="padding:5px;" data-toggle="dropdown">
                        <img src="/static/img/default.jpg" alt="" width="40">
                        &nbsp;{{request.session.username}}
                        <span class="badge" style="background-color: #D94600;">{{notification_count}}</span>
                        
                        
                </a>
                <ul class="dropdown-menu navbar-right">
                    {% if not column.zy_id %}
                    <li><a href="/blog/publish.html?column={{request.session.column}}">
                        <span class="glyphicon glyphicon-user"></span>
                        发布文章</a></li>
                    <li><a href="/blog/userarticle.html?column={{request.session.column}}">
                        <span class="glyphicon glyphicon-lock"></span>
                        我的文章</a></li>
                    <li><a href="/blog/user/notification">
                        <span class="glyphicon glyphicon-envelope"></span>
                        消息
                        <span class="badge" style="background-color: #D94600;">{{notification_count}}</span>
                        </a></li>
                    {% endif %}
                    <li><a href="/blog/column.html" >
                        <span class="glyphicon glyphicon-log-out"></span>
                        切换论坛</a></li>
                     <li><a href="/" >
                        <span class="glyphicon glyphicon-log-out"></span>
                        返回主页</a></li>
                     <li><a href="/login.html" >
                        <span class="glyphicon glyphicon-log-out"></span>
                        退出登录</a></li>
                </ul>
                </li>
                
            </ul>

            <!--
            <span class="navbar-text navbar-right">----分享Geek生活</span>
            -->
        </div>
    </div>
</header>

